package com.smmisia.shop.mapper;

import com.smmisia.shop.entity.TradeOrder;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import jakarta.validation.constraints.NotNull;
import org.apache.ibatis.annotations.Mapper;


@Mapper
public interface TradeOrderMapper extends BaseMapper<TradeOrder> {

    TradeOrder selectByIdentifier(@NotNull(message = "identifier 不能为空") String identifier, @NotNull(message = "买家id不能为空") String buyerId);

    TradeOrder selectByOrderId(@NotNull(message = "orderId 不能为空") String orderId);

    int updateByOrderId(TradeOrder existOrder);

    TradeOrder selectByOrderAndBuyerId(String orderId, String buyerId);
}




